package com.ruoyi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName investment
 */
@TableName(value ="investment")
@Data
public class Investment implements Serializable {
    /**
     * 投资id
     */
    @TableId(type = IdType.AUTO)
    private Integer iid;

    /**
     * 用户id
     */
    private Integer uid;

    /**
     * 基金id
     */
    private Integer fid;

    /**
     * 投资状态
     */
    private String itype;

    /**
     * 基金到期时间
     */
    private Date expiretime;

    /**
     * 基金投资金额
     */
    private BigDecimal imoney;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Investment other = (Investment) that;
        return (this.getIid() == null ? other.getIid() == null : this.getIid().equals(other.getIid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getItype() == null ? other.getItype() == null : this.getItype().equals(other.getItype()))
            && (this.getExpiretime() == null ? other.getExpiretime() == null : this.getExpiretime().equals(other.getExpiretime()))
            && (this.getImoney() == null ? other.getImoney() == null : this.getImoney().equals(other.getImoney()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIid() == null) ? 0 : getIid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getItype() == null) ? 0 : getItype().hashCode());
        result = prime * result + ((getExpiretime() == null) ? 0 : getExpiretime().hashCode());
        result = prime * result + ((getImoney() == null) ? 0 : getImoney().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", iid=").append(iid);
        sb.append(", uid=").append(uid);
        sb.append(", fid=").append(fid);
        sb.append(", itype=").append(itype);
        sb.append(", expiretime=").append(expiretime);
        sb.append(", imoney=").append(imoney);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}